package cn.zy.company.entity;

import java.util.Date;

public class News extends NewsEdit {
    private Integer id;
    private String name;
    private String value;
    private Date date;
    private Integer userId;

    public News() {
    }

    public News( String name, String value, Integer userId,String username) {
        this.name = name;
        this.value = value;
        this.userId = userId;
        User user=new User();
        user.setId(id);
        user.setUsername(username);
        this.setUser(user);
    }

    @Override
    public String toString() {
        return "News{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", value='" + value + '\'' +
                ", date=" + date +
                ", userId=" + userId +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }
}
